//
//  UploadFile.h
//  MyNotification
//
//  Created by zhyuan on 8/24/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>

@protocol UploadFileDelegate;

@interface UploadFile : NSObject
{
	NSURLConnection *conn;
	NSMutableData *activeData;
	
	NSData *fileData;
	NSString *fileName;
	NSString *serverPath;
    NSString* message;
    NSString* subjectName;
	
	id<UploadFileDelegate> delegate;
}

@property (nonatomic, assign) id<UploadFileDelegate> delegate;
@property (nonatomic, retain) NSData *fileData;
@property (nonatomic, copy) NSString *fileName;
@property (nonatomic, copy) NSString *serverPath;
@property (nonatomic, copy) NSString* message;
@property (nonatomic, copy) NSString* subjectName;


- (id)initWithDataForReply:(NSString *)url data:(NSData *)data imageName:(NSString*)imageName message:(NSString*)message1;

- (id)initWithDataForDeliver:(NSString *)url data:(NSData *)data imageName:(NSString*)imageName subjectName:(NSString*)subjectName message:(NSString*)message1;

- (void)sendReply;
- (void)sendDeliver;



@end

@protocol UploadFileDelegate


- (void)uploadFile:(UploadFile *)controller didUploadFileSucceed:(NSString *)succeed;

- (void)uploadFile:(UploadFile *)controller didUploadFileFailed:(NSString *)error;
@end

